import { createRouter, createWebHashHistory } from 'vue-router'
import st from '../components/PageStructure.vue'

const routes = [
  {
    path: '/about',
    name: 'about',
    component: () => import('../views/AboutView.vue')
  },
  {
    path: '/',
    redirect: ''
  },
  {
    path: '',
    name: 'PageStruct',
    component: st,
    redirect: '/home',
    children: [
      {
        path: 'home',
        name: 'welcome',
        component: () => import('../components/WelcomePage.vue')
      },
      {
        path: 'aiteacher',
        name: 'AiTeacher',
        component: () => import('../components/AiTeacher.vue')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
